<#assign tit>上传签名图片测试</#assign>
<@page.html title=tit>
<script type="text/javascript" src="${_appPath!}/js/upload.js"></script>
<script type="text/javascript">
  function doUpload(fm) {
    if(_isupl) return;
    if(!chkfile(fm.signFile.value)) return false;
    _isupl = true;
    return true;
  }
  function chkfile(ff) {
    if(ff!="") {
      var ext = ff.substr(ff.length-4).toLowerCase();
      if(ext==".gif" || ext==".jpg" || ext==".png" || ext==".flv") {
        return true;
      } else
        window.alert("只能上传gif,jpg,png和flv格式");
    } else {
      window.alert("请选择文件");
    }
    return false;
  }
  function uploadSucc() {
    window.alert("提交成功");
    cload();
  }
</script>
<div style="width:450px;">

  <form id="fm_upload" method="post" action="_upload" enctype="multipart/form-data" target="ifm_upload" onsubmit="return doUpload(this);">
    <input type="hidden" name="id" value="${sign.autoId!}">
    <div class="kbox">
      <table class="input">
        <tr>
          <th width="25%">合同号</th>
          <td width="75%">${sign.contractCode!}</td>
        </tr>
        <tr>
          <th>合同类型</th>
          <td><@value type="signContractType" key="${sign.contractType!}"/></td>
        </tr>
        <tr>
          <th>会员姓名</th>
          <td>${sign.memberName!}</td>
        </tr>
        <tr>
          <th>头像图片</th>
          <td><input type="file" name="headFile"></td>
        </tr>
        <tr>
          <th>签名图片</th>
          <td><input type="file" name="signFile"></td>
        </tr>
      </table>
    </div>
    <div class="button"><input type="submit" value="提 交"></div>
  </form>
  <iframe name="ifm_upload" onload="uploadOk(this);" style="width:0px; height:0px; display:none;"></iframe>
</div>
</@page.html>